$(function(){
    $("#tj").click(function(){
        var mpass = $("#mpass").val();
        var password = $("#newpass").val();
        $.ajax({
            type: "post",
            url: "../../Index.html?c=ht_newpass&m=ht_newpass",
            dataType:"json",
            data: {
                mpass:mpass,
                password: password
            },
            success:function(msg){
                if(msg){
                    layer.open({
                        content: '修改成功！',
                        btn: ['确定'],
                        yes: function() {
                            parent.location.href='../../templates/admin/Index.html';
                        }
                    });
                }else {
                    layer.open({
                        content:"修改失败",
                        btn: ['确定']
                    })
                }
            },
            error:function(xhr,errorText,errorType){
                layer.open({
                    content:'服务器无反应！',
                    btn: ['确定']
                })
            }
        });

    });

});
